package com.dy.mapper;

import com.dy.domain.FenLei;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface FenleiMapper {

    List<FenLei> mohu(String ming);

    @Insert("insert into fenlei values(null,#{book})")
    void add(FenLei fenLei);

    @Select("select * from fenlei where id = #{id}")
    FenLei huixian(Integer id);

    @Update("update fenlei set book = #{book} where id = #{id}")
    void update(FenLei fenLei);

    @Delete("delete from fenlei where id = #{id}")
    void del(Integer id);


    @Select("select * from fenlei")
    List<FenLei> findall();

}
